package com.atxiaodei.kabudashejimoshi.责任链模式.校验采用设计模式;

import com.atxiaodei.kabudashejimoshi.责任链模式.Member;
import org.apache.commons.lang.StringUtils;

/**
 * 校验handler
 */
public class ValidateHandler extends Handler{

    @Override
    public void doHandle(Member member) {

        if (StringUtils.isEmpty(member.getLoginName()) || StringUtils.isEmpty(member.getLoginPass())) {
            System.out.println("用户名密码不能为空");
            return ;
        }
        System.out.println("校验成功继续向下执行");
        chain.doHandle(member);
    }

}
